package com.turing.post.salesmanage.util;

// default package

import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 * 充值单销售员明细
 * 
 * @author zxppanda
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "DEPOSITORDERSALESDETAIL")
@IdClass(DepositOrderSalesDetail.class)
public class DepositOrderSalesDetail implements java.io.Serializable {

	private BigInteger depositOrderId;
	private BigInteger salesId;
	private BigInteger salesAmount;

	public DepositOrderSalesDetail() {

	}

	@Id
	@Column(name = "DEPOSITORDERID")
	public BigInteger getDepositOrderId() {
		return depositOrderId;
	}

	public void setDepositOrderId(BigInteger depositOrderId) {
		this.depositOrderId = depositOrderId;
	}

	@Id
	@Column(name = "SALESID")
	public BigInteger getSalesId() {
		return salesId;
	}

	public void setSalesId(BigInteger salesId) {
		this.salesId = salesId;
	}

	@Column(name = "salesAmount")
	public BigInteger getSalesAmount() {
		return salesAmount;
	}

	public void setSalesAmount(BigInteger salesAmount) {
		this.salesAmount = salesAmount;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((getDepositOrderId() == null) ? 0 : getDepositOrderId()
						.hashCode());
		result = prime * result
				+ ((this.getSalesId() == null) ? 0 : getSalesId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final DepositOrderSalesDetail other = (DepositOrderSalesDetail) obj;
		if (getDepositOrderId() == null) {
			if (other.getDepositOrderId() != null)
				return false;
		} else if (!getDepositOrderId().equals(other.getDepositOrderId()))
			return false;
		if (getSalesId() == null) {
			if (other.getSalesId() != null)
				return false;
		} else if (!getSalesId().equals(other.getSalesId()))
			return false;
		return true;
	}
}